package com.djinfo.work.service;

import com.djinfo.work.common.bean.AjaxJson;
import com.djinfo.work.entity.Department;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * Created by lenovo on 2017/5/17.
 */
public interface DepartmentService {
    public void save(Department object);
    public void update(Department object);
    //public void delete(Department object);
    public Department getDepartmentById(String id);
    public List<Department> page(Department object, Integer pageNum, Integer pageSize);
    public List<Department> list();
    public Integer getAllRowCount(Department department);

    public  List<Department> getDepartsBy(String parentid);

    public List<Department> getTwoDepartid();

    public List<Department> getOneDepartid();

    public List<Department> setTwoToOne(String deptid);
    //获取一级部门列表部门的列表
    public List<Department> getLevel1DepartmentList();
    //获取二级部门的列表
    public List<Department> getLevel2DepartmentList();

    public void deleteChildDepartmentByParentId(String pid);

    /**
     * 获取部门列表
     * @param department
     * @param pagenum
     * @param pagesize
     * @return
     */
    public AjaxJson list(Department department, Integer pagenum, Integer pagesize);

    /**
     * 分配部门
     * @param uid
     * @return
     */
    public AjaxJson deptList(String uid);

    /**
     * 获取以及部门列表
     * @return
     */
    public AjaxJson getDeptList();

    /**
     * 保存修改操作
     * @param department
     * @param request
     * @return
     */
    public AjaxJson saveOrUpdate(Department department,HttpServletRequest request);

    /**
     * 删除
     * @param department
     * @return
     */
    public AjaxJson deleteDept(Department department);

    public AjaxJson deptList(Department department);


}
